# 作者：陈睿-cruise
# 2025年02月20日15时22分35秒
# 2979386061@qq.com
import fastapi,uvicorn
from fastapi import FastAPI
from fastapi.responses import Response
app=fastapi.FastAPI()
@app.get('/')
def show():
    with open('html/index.html','rb') as f:
        data=f.read()
    return Response(content=data,media_type='html')
@app.get('/{path}')
def show(path:str):
    with open('html/{path}','rb') as f:
        data=f.read()
    return Response(content=data,media_type='html')
@app.get('/images/{path}')
def show():
    with open('images/{path}','rb') as f:
        data=f.read()
    return Response(content=data,media_type='jpg')
uvicorn.run(app,host='127.0.0.1',port=8082)
